<?php

namespace app\adminapi\lists\system;

use adminmatrix\admin\lists\BaseListsData;
use app\adminapi\model\Admin\AdminPermission;

class PermissionLists extends BaseListsData
{


    public function lists(): array|object
    {
        // TODO: Implement lists() method.
        return  buildTree((new AdminPermission)->select()->toArray());
    }

    public function count(): int
    {
        // TODO: Implement count() method.
        return (new AdminPermission) -> count();
    }
}